<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
		window.onload = function  () {

			var  p = document.getElementById('p');

			var  img = document.getElementById('img');


			p.setAttribute('name', "学并思");


			alert(p.getAttribute('xbs'));

			// img.src="7899.jpg";

			// p.id = "xbs";
			// p.name = "学并思";

			// text = p.textContent;

			// alert(text);

			// p.innerHTML = "xbs";
			// p.innerText
		}

	</script>
</head>
<body>
	<p id="p" xbs="这个是一个学并思属性" ><a href="">学并思</a></p>
	<img src="./box1.jpg" alt="" id="img">
	<a href=""></a>
</body>
</html>